const { Sequelize } = require('sequelize')
const { MYSQL_HOST, MYSQL_DATA, MYSQL_USER, MYSQL_PASSWORD } = require('../config/config.default')

const seq = new Sequelize(MYSQL_DATA, MYSQL_USER, MYSQL_PASSWORD, {
    host: MYSQL_HOST,
    dialect: 'mysql'
})

seq.authenticate()
    .then(() => {
        console.log('ok')
    })
    .catch(err => {
        console.log(err)
    })

module.exports = seq